home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
dev
/
gg
/
gengetopt-2.6.lha
/
gengetopt-2.6
/
configure.in
< prev
next >
Wrap
Text File
|
2001-12-31
|
3KB
|
105 lines
# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
#
# This file is part of GNU gengetopt
#
# GNU gengetopt is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU gengetopt is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with gengetopt; see the file COPYING. If not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl Process this file with autoconf to produce a configure script.
AC_INIT(reconf)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gengetopt,2.6)
dnl directory for docs (html)
AC_SUBST(gengetoptdocdir)
gengetoptdocdir=$datadir/doc/gengetopt
dnl directory for examples
AC_SUBST(gengetoptexamplesdir)
gengetoptexamplesdir=$gengetoptdocdir/examples
dnl Checks for C compiler.
AC_PROG_CC
dnl add options for non GNU compilers
AC_NONGNU_FLAGS
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
dnl Checks for C++ compiler.
AC_PROG_CXX
dnl test for --enable-warnings command line option
AC_ARG_ENABLE( warnings, [ --enable-warnings enable compiler warnings], AC_COMPILE_WARNINGS )
dnl for executable extensions
AC_EXEEXT
dnl for txtc (Text-to-C compiler)
AC_PROG_AWK
LF_PROG_TXTC
dnl for yacc or bison
AC_PROG_YACC
dnl set some flags for yacc to generate header file
AC_SUBST(YFLAGS)dnl
YFLAGS="$YFLAGS -d"
dnl for lex or flex
AM_PROG_LEX
dnl Checks for libraries.
dnl Replace `main' with a function in -lfl:
AC_CHECK_LIB(fl, main)
dnl if (f)lex library is not present (yywrap won't be found) we provide
dnl a simple implementation (see yywrap.cc) which will be included in
dnl LIBOBJS and linked against the program (see src/Makefile.am)
dnl this works with flex generated files (I don't know about others)
AC_REPLACE_FUNCS(yywrap)
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(malloc.h strings.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
dnl Checks for library functions.
AC_REPLACE_FUNCS(strdup)
dnl check for getopt in standard library
AC_CHECK_FUNCS(getopt_long , , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"] )
AC_PATH_PROGS(TAR, tar gtar)
dnl this is only for developers who change doc/sample1.ggo file
dnl GNU cpp2html can be found at http://www.gnu.org/software/cpp2html
AC_PATH_PROGS(CPP2HTML, cpp2html)
AM_CONDITIONAL(NO_GETOPTLONG, test "$ac_cv_func_getopt_long" = no )
AM_CONDITIONAL(NO_STRDUP, test "$ac_cv_func_strdup" = no )
AM_CONDITIONAL(NO_CPP2HTML, test -z "$ac_cv_path_CPP2HTML" )
AC_OUTPUT([Makefile txtc.sh src/Makefile doc/Makefile doc/gengetopt.1
doc/gengetopt.html tests/Makefile tests/no_optgiven.sh
tests/more_than_once.sh],
[chmod +x tests/no_optgiven.sh
chmod +x tests/more_than_once.sh])